package com.example.drugs1.dao;

import com.example.drugs1.entities.Room;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.CrudRepository;

import java.util.List;

public interface RoomRepository extends CrudRepository<Room,Long> {

    @Override
    List<Room> findAll();

    Room findByRoomId(long theId);

    @Query(value = "select * from Room where name LIKE %?%",nativeQuery = true)
    List<Room> selectRoom(String name);
}
